package com.example.demo.threadSafeAll;

public class ProducerAll implements Runnable {
    private VoAll vo;
    public ProducerAll(VoAll vo){
        this.vo = vo;
    }
    @Override
    public void run() {
        for(int i=0; i<100; i++){

            if(i%2==0){
                vo.setVo(i + "胡歌", "将军");
            }else{
                vo.setVo(i + "刘涛", "郡主");
            }
        }
    }
}
